<?php
/**
 * Created by PhpStorm.
 * User: pna
 * Date: 15.02.14
 * Time: 20:02
 */

class MyController{
    protected $renderer;

    function __construct($myRenderer){
        $renderer = $myRenderer;
        $renderer->controller = $this;
    }


    public function action(){

        //...
        //$renderer->render();
    }

    public function render($param1, $param2){
        //normal render
    }



}


class Renderer{

    public $controller;


    public function render($param1, $param2){
        $this->controller->render($param1, $param2);
    }



}


class TEst{
    function test(){
        $renderer = new MockedRenderer();
        $myController = new MyController($renderer);


    }


}
